home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 December / CHIPNET Aralık 1997.iso / linux / redhat / misc / src / install / mono.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-11  |  623 b   |  29 lines

  1. #include <newt.h>
  2. #include <stdlib.h>
  3.  
  4. void setColorState(void) {
  5.     newtComponent label, f, answer;
  6.     newtComponent yes, no;
  7.     char *MonoEnv="NEWT_MONO";
  8.     newtOpenWindow(21, 7, 35, 9, "Color Choices");
  9.  
  10.     label = newtLabel(2, 2, "Are you using a color monitor?");
  11.  
  12.     yes = newtButton(5, 5, "Yes");
  13.     no = newtButton(22, 5, "No");
  14.  
  15.     f = newtForm(NULL, NULL, 0);
  16.     newtFormAddComponents(f, label, yes, no, NULL);
  17.  
  18.     answer = newtRunForm(f);
  19.     if (answer == f)
  20.         answer = newtFormGetCurrent(f);
  21.  
  22.     newtFormDestroy(f);
  23.     newtPopWindow();
  24.  
  25.     if (answer == yes)
  26.         unsetenv(MonoEnv);
  27. }
  28.  
  29.